package day0214;

import java.util.Arrays;

public class Demo {


    public static void main(String[] args) {
        char[][] chunxiao = {
                { '春' , '眠' , '不' , '觉' , '晓' } ,
                { '处' , '处' , '闻' , '啼' , '鸟' } ,
                { '夜' , '来' , '风' , '雨' , '声' } ,
                { '花' , '落' , '知' , '多' , '少' }
        } ;

//        for (int j = 0; j < chunxiao[0].length; j++) {
//            for (int i = chunxiao.length - 1; i >= 0 ; i --) {
//                System.out.print(chunxiao[i][j] + " ");
//            }
//            System.out.println();
//        }

        char[][] newArr = new char[chunxiao[0].length][chunxiao.length];

        for (int i = 0; i < newArr.length; i ++) {

            for (int j = chunxiao.length - 1; j >= 0; j -- ){
                newArr[i][chunxiao.length - 1 - j] = chunxiao[j][i];
            }
        }

        for (int i = 0; i < newArr.length; i++) {
            System.out.println(Arrays.toString(newArr[i]));
        }
    }
}
